var express = require("express");
var router = express.Router();

const resData = {
  show: [
    {
      number: 1,
      thumbnail:
        "https://img.chinasongzhuang.cn/uploadimg/image/20200219/20200219180104_83804.jpg ",
      uploadTime: "2021-7-23",
      showShop: "全部",
      status: "true",
      videoLink:
        "https://img.chinasongzhuang.cn/uploadimg/image/20200219/20200219180104_83804.jpg ",
      operation: "show",
    },
    {
      number: 2,
      thumbnail:
        "https://img.chinasongzhuang.cn/uploadimg/image/20200219/20200219180104_83804.jpg ",
      uploadTime: "2021-7-23",
      showShop: "全部",
      status: "true",
      videoLink:
        "https://img.chinasongzhuang.cn/uploadimg/image/20200219/20200219180104_83804.jpg ",
      operation: "show",
    },
    {
      number: 3,
      thumbnail:
        "https://img.chinasongzhuang.cn/uploadimg/image/20200219/20200219180104_83804.jpg ",
      uploadTime: "2021-7-23",
      showShop: "部分",
      status: "true",
      videoLink:
        "https://img.chinasongzhuang.cn/uploadimg/image/20200219/20200219180104_83804.jpg ",
      operation: "show",
    },
    {
      number: 4,
      thumbnail:
        "https://img.chinasongzhuang.cn/uploadimg/image/20200219/20200219180104_83804.jpg ",
      uploadTime: "2021-7-23",
      showShop: "全部",
      status: "true",
      videoLink:
        "https://img.chinasongzhuang.cn/uploadimg/image/20200219/20200219180104_83804.jpg ",
      operation: "show",
    },
    {
      number: 5,
      thumbnail:
        "https://img.chinasongzhuang.cn/uploadimg/image/20200219/20200219180104_83804.jpg ",
      uploadTime: "2021-7-23",
      showShop: "部分",
      status: "true",
      videoLink:
        "https://img.chinasongzhuang.cn/uploadimg/image/20200219/20200219180104_83804.jpg ",
      operation: "show",
    },
  ],
  notShow: [
    {
      number: 1,
      thumbnail:
        "https://img.chinasongzhuang.cn/uploadimg/image/20200219/20200219180104_83804.jpg ",
      uploadTime: "2021-7-23",
      showShop: "全部",
      status: "false",
      videoLink:
        "https://img.chinasongzhuang.cn/uploadimg/image/20200219/20200219180104_83804.jpg ",
      operation: "notShow",
    },
    {
      number: 2,
      thumbnail:
        "https://img.chinasongzhuang.cn/uploadimg/image/20200219/20200219180104_83804.jpg ",
      uploadTime: "2021-7-23",
      showShop: "全部",
      status: "false",
      videoLink:
        "https://img.chinasongzhuang.cn/uploadimg/image/20200219/20200219180104_83804.jpg ",
      operation: "notShow",
    },
    {
      number: 3,
      thumbnail:
        "https://img.chinasongzhuang.cn/uploadimg/image/20200219/20200219180104_83804.jpg ",
      uploadTime: "2021-7-23",
      showShop: "部分",
      status: "false",
      videoLink:
        "https://img.chinasongzhuang.cn/uploadimg/image/20200219/20200219180104_83804.jpg ",
      operation: "notShow",
    },
  ],
};

router.get("/info", function (request, response) {
  let resStatus = {
    code: 0,
    data: resData,
    msg: "success",
  };
  response.send(resStatus);
});

router.post("/abc", function (request, response) {
  var data = "";
  request.on("data", (chunk) => {
    data += chunk;
  });
});

module.exports = router;
